<?php
class SF_Album_ListController extends Mage_Core_Controller_Front_Action
{
	public function indexAction() {
		$this->loadLayout();
		$act = $this->getRequest()->getParam('code');
		
		switch($act){
			case 'new':
				$title 	   = 'New Arrivals';
				$blockName = 'album/newproblock';
				$template  = 'sf_album/list/index.phtml';
				break;
			case 'bestsales':
				$title 	   = 'Best Sellers';
				$blockName = 'album/bestsales';
				$template  = 'sf_album/list/index.phtml';
				break;
			case 'saleoff':
				$title 	   = 'Sale OFF';
				$blockName = 'album/saleoff';
				$template  = 'sf_album/list/index.phtml';
				break;
			default:
				$title 	   = 'New Arrivals';
				$blockName = '';
				$template  = 'sf_album/list/index.phtml';
				break;
		}
		
		$block = $this->getLayout()->createBlock($blockName);
		$block->setTemplate($template);
		$this->getLayout()->getBlock('head')->setTitle($this->__($title));
		$this->getLayout()->getBlock('content')->append($block);
		$this->renderLayout();
	}

	
	
}
